{if (!empty($myworker) && $myworker['level']==4 && $myworker['agent']['is_agent']) || ($system['is_member_points']==1 && !empty($themyrecord)) || $system['isCommPoints']==1}
<style type="text/css">
	.agent_icon {z-index:2;position:fixed; transition:all 0.5s; right:4px; bottom:35%; background:url({$_G['URL']['YX2020_CSS']}images/cont1.png) center no-repeat;
		width:85px; height:159px; background-size:100% auto;}
	.agent_icon_userIcon { overflow: hidden;border:1px solid #ffffff; width:36px; height:36px; top:-11px; left:50%; margin-left:-18px; border-radius:50%; position:absolute;}
	.agent_icon_userIcon img { width:100%;}
	.downScroll { transform:translateX(70%); opacity:0.5;}
	.agent_icon li:nth-child(1) { box-sizing:border-box; background:url({$_G['URL']['YX2020_CSS']}images/tag1.png) center no-repeat; width:70px; height:34px; background-size:100% auto;
		margin:55px auto 0; padding-left:23px; color:#965c1d; font-size:18px; line-height:34px; text-align:center;}
	.agent_icon li:nth-child(2) { box-sizing:border-box; background:url({$_G['URL']['YX2020_CSS']}images/tag2.png) center no-repeat; width:70px; height:34px; background-size:100% auto;
		margin:3px auto 0; padding-left:23px; color:#bf1c30; font-size:18px; line-height:34px; text-align:center;}
	.agent_icon .checkLink { display:block; width:67px; height:22px; border-radius:3px; margin:3px auto 0; border:1px solid #7725d4; color:#e3c9ff;
		font-size:11px; line-height:22px; text-align:center;}
	.agent_icon.adOne { background:url({$_G['URL']['YX2020_CSS']}images/cont2.png) center no-repeat; height:130px; background-size:100% auto;}
	.agent_icon.adOne .checkLink { margin-top:5px;}
</style>
<div class="agent_icon">
	<div class="agent_icon_userIcon">
		<img src="{$fans['avatar']}">
	</div>
	<ul>
		{if $system['is_member_points']==1}
		<li style="background:url({$_G['URL']['YX2020_CSS']}images/tag3.png) center no-repeat;background-size:100% auto;margin: 70px auto 0;">
			<a href="#" style="color:#965c1d;font-weight: 600;">{php echo str_replace('.00','',$themyrecord['chongzhi']);}</a>
		</li>
		{elseif $system['isCommPoints']==1}
			<li style="background:url({$_G['URL']['YX2020_CSS']}images/tag3.png) center no-repeat;background-size:100% auto;">
				<a href="{php echo $_G['siteroot'].createMobileUrl("mycomm",array("themeid"=>$themeid));}" style="color:#965c1d;font-weight: 600;">{php echo str_replace('.00','',$CommPoints['total']);}</a>
			</li>
		{else}
		<li>
			<a href="{php echo $_G['siteroot'].createMobileUrl("w_order_agent",array("themeid"=>$themeid));}" style="color:#965c1d;font-weight: 600;">{$myworker['agent']['selling_agent_count']}</a>
		</li>
		{/if}
		{if !empty($myworker) && $myworker['level']==4 && $myworker['agent']['is_fenxiao']}
		<li>
			<a href="{php echo $_G['siteroot'].createMobileUrl("w_order_agent",array("themeid"=>$themeid));}" style="color:#bf1c30;font-weight: 600;">{$myworker['agent']['selling_agent_fee']}</a>
		</li>
		{/if}
	</ul>
	{if $system['isCommPoints']==1}
	<a href="{php echo $_G['siteroot'].createMobileUrl("mycomm",array("themeid"=>$themeid));}" class="checkLink">查看详情</a>
	{elseif $system['is_member_points']==0}
	<a href="{php echo $_G['siteroot'].createMobileUrl("w_order_agent",array("themeid"=>$themeid));}" class="checkLink">查看详情</a>
	{/if}
</div>
</body>

<script>
	$(function(){
		var num = $('.agent_icon li').length;
		if(num>1){

		}else{
			$('.agent_icon').addClass('adOne')
		}
	})
	var t = 0,
			b = 0;
	$(window).scroll(function(){
		t = $(this).scrollTop();
		if(b < t){
			//向下滚动
			$('.agent_icon').addClass('downScroll')
			setTimeout(function(){
				$('.agent_icon').removeClass('downScroll');
			},2000)
		}else{
			//向上滚动
			$('.agent_icon').removeClass('downScroll');

		}
		setTimeout(function(){
			b = t
		}, 0)
	})
</script>
{/if}